package com.cms.service.Impl;

import com.cms.dto.LoginDTO;
import com.cms.entity.User;
import com.cms.mapper.UserMapper;
import com.cms.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User login(LoginDTO loginDTO) {
        return userMapper.login(loginDTO);
    }

    @Override
    public Integer save(User user) {
        return userMapper.save(user);
    }

    @Override
    public List<User> list() {
        return userMapper.list();
    }

    @Override
    public Integer delete(Integer id) {
        return userMapper.delete(id);

    }
}
